{% extends 'bootstrap-modal-layout.html.twig' %}

{% set modal_class = 'cd-modal-dialog' %}

{% do script(['libs/jquery-validation.js','app/js/settings/setup-password/index.js'])%}

{% block title %}
  {{'user.settings.security.setup_login_password'|trans}}
{% endblock %}

{% block body %}
  <form id="setup-password-form" method="post" action="{{ path('settings_setup_password') }}" data-goto="{{ path(targetPath) }}" data-targe-type="{{ showType }}">
    <div class="alert cd-alert cd-alert-warning">
      {{'user.settings.security.safety_tips'|trans}}
    </div>

    <div class="form-group cd-form-group">
      <label for="form_newPassword">{{'user.settings.security.password_modify.new_password'|trans}}</label>
      {{ form_widget(form.newPassword, {attr:{class:'form-control'}}) }}
    </div>

    <div class="form-group cd-form-group cd-mb24">
      <label for="form_confirmPassword">{{'user.settings.security.password_modify.confirm_password'|trans}}</label>
      {{ form_widget(form.confirmPassword, {attr:{class:'form-control'}}) }}
    </div>
    {{ form_rest(form) }}
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>
{% endblock %}

{% block footer %}
  <button type="button" class="btn cd-btn cd-btn-flat-default cd-btn-lg" data-dismiss="modal">
    {{'form.btn.cancel'|trans}}
  </button>
  <button id="form-submit" type="button" class="btn cd-btn cd-btn-primary cd-btn-lg" data-toggle="form-submit" data-target="#setup-password-form" data-loading-text="{{'form.btn.save.submiting'|trans}}">{{'form.btn.submit'|trans}}</button>
{% endblock %}